<$MACRO MY_ADDRESS>hugo@some.where</$MACRO>So every time, you insert the macro-tag
<MY_ADDRESS>in your HSC-source, it will be replaced with the email address seen above in the HTML-file.
Anyway, while other people think about which logical style should get his own tag and which not, you can define your own styles. For example, a logical style to render a filename could look like this:
<$MACRO FNM> <I> </$MACRO>
<$MACRO /FNM> </I> </$MACRO>Your new style can be used like all other styles:
..open the file <FNM>hugo.txt</FNM> and..In this case, filenames will be rendered italic. This seems much more reasonable to me then producing heaps of logical styles, but..
Note that you just created a container that requires an openig and closing tag.
An attribute is defined with
name ":" type [ "=" default value ]Legal attribute types are:
<$MACRO BUTTON_NEXT NXTREF:uri>This defines a macro that defines a button that references to the next page. As every page has its own next page, you can set one attribute for this macro: NXTREF, which is the URI that should be referenced as the "next" page.
<A HREF=<NXTREF>>
<IMG SRC="image/next.gif" ALT="Next">
</A>
</$MACRO>
So an example usage of this macro would be:
<BUTTON_NEXT NXTREF="sepp.html">Note that the value of NXTREF is passed to the HREF attribute within the <A> tag when the macro is extracted.
If an attribute should get its value from an other attribute, the source attributes name needs to be enclosed in "<..>", like HREF=<NXTREF> (see above), which assigns the value of the macro attribute NXTREF to the tag attribute HREF.
Macro attributes can only be defined within opening macros. The coresponding closing macro automatically inherits all attributes of its opening macro. This seems more HTML-like to me.
This is not all that can be told about hsc's macros. Macros also support default values and several flags. Yeah, I really should improve the docs.. If you want to take a look at some quite complex macros, take a look at the file src_docs/inc/macro.hsc in this distribution.